package me.keiwu.user.domain;

import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.util.List;

/**
 * Created by kei on 25/11/2017.
 * 套装，单件
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = false)
public class Item extends AbstractBaseEntity {

    @Id
    @GeneratedValue
    private Integer id;

    @ColumnDefault("0")
    @Column(nullable = false)
    private Integer itemType = 0;

    @Column(length = 100)
    private String name;

    @Column(length = 200)
    private String imgUrl;

    @ColumnDefault("0")
    @Column(nullable = false)
    private Integer costGold = 0;

    @ColumnDefault("0")
    @Column(columnDefinition = "TINYINT", length = 1, nullable = false)
    private boolean shareGet = false;

    @ColumnDefault("0")
    @Column(columnDefinition = "TINYINT", length = 1, nullable = false)
    private boolean shelve = false;

    @Column(columnDefinition = "TEXT")
    private String itemDetail;



    // 是否获得
    @Transient
    private boolean get;

    // 是否穿上
    @Transient
    private boolean set;

    @Transient
    private List<CombAvatar> combAvatars;

}
